﻿App.define('user', [], (function(undefined) {
	var user = {}, currentUser;

	user.isAuthorized = function() {
		return !App.isUndefined(currentUser);
	};

	user.init = function(data) {
		currentUser = data;
		user.name = currentUser.name;
		user.color = currentUser.color;
	};

	user.remove = function() {
		currentUser = undefined;
		user.name = undefined;
		user.color = undefined;
	};
	return user;
})());